/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.fd.manager;

import java.util.Collection;
import java.util.List;

import com.xy.biz.fd.domain.bo.DocumentShareBO;
import com.xy.biz.fd.domain.query.DocumentShareQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-2-8
 */
public interface DocumentShareManager {

	/**
	 * 保存
	 *
	 * @param documentShareBO
	 */
	int saveDocumentShare(DocumentShareBO documentShareBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllDocumentShare(Collection<DocumentShareBO> collection);

	/**
	 * 更新
	 *
	 * @param documentShareBO
	 */
	int updateDocumentShare(DocumentShareBO documentShareBO);

	/**
	 * 删除
	 *
	 * @param documentShareId
	 */
	int deleteDocumentShare(Long documentShareId);

	/**
	 * 删除
	 *
	 * @param documentShareId
	 */
	int relDeleteDocumentShare(Long documentShareId);

	/**
	 * 批量删除
	 *
	 * @param collection
	 */
	int updateDocumentShareS(Collection<Long> collection);

	/**
	 * 批量删除
	 *
	 * @param documentShareIdS
	 */
	int deleteDocumentShareS(Collection<Long> documentShareIdS);

	/**
	 * 查找一个
	 *
	 * @param documentShareId
	 * @return
	 */
	DocumentShareBO getDocumentShare(Long documentShareId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<DocumentShareBO> listDocumentShareById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<DocumentShareBO> listDocumentShare(DocumentShareQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countDocumentShare(DocumentShareQuery query);

	/**
	 * 根据创建用户id,文档id,分享目标用户id查找
	 *
	 * @param documentShareBO
	 * @return
	 */
	DocumentShareBO getDocumentShareOne(DocumentShareBO documentShareBO);

	/**
	 * 批量查询已分享的
	 * @param query
	 * @return
	 */
	int cancelExistingShare(DocumentShareQuery query);
}
